It is becoming more common for workstations and general purpose computer systems to be used for visual simulations. Such simulations are particularly useful in high end systems for industrial modeling applications and in lower end systems for entertainment (e.g., simulations, computer games, multi-media applications, etc.). Computer controlled graphics systems display graphics objects on a 2 dimensional (2-D) display; the graphics objects being composed of graphics primitive elements ("graphics primitives") that may include, for instance, points, lines, polygons, etc. represented using three dimensional (3-D) data structures (e.g., x, y, z). As is well known, the object displayed is represented internally by the graphics system with three dimensional (3-D) data structures (e.g., x, y, z) which are transformed into 2-D elements (e.g., x, y) which are then used to render a 2-D image of the 3-D object. The process of rendering images on the screen is complex and includes individually processing graphics primitives and performing texture mapping operations on them.
Texture mapping refers to techniques for adding surface detail to areas or surfaces of the 3-D graphics objects displayed on the 2-D display. Since the original graphics object is 3-D, texture mapping maintains certain perspective attributes with respect to the surface detail added to the object. Generally, texture mapping occurs by accessing encoded surface detail points or "texels" from a memory which stores the surface detail and then transferring the surface detail texels to predetermined points of the graphics primitive that is being texture mapped. More specifically, texture mapping operates by applying color or visual attributes of texels of the (u, v) texture map to corresponding pixels of the graphics object on a display screen. In texture mapping, color values for pixels in (x, y) display coordinate space are determined based on sampled texture map values from (u, v) coordinates. After texture mapping, a version of the texture image is visible on surfaces of the object. The manner in which the texels are accessed and used to provide the perspective is a complex process that can utilize interpolation which increases processing speed but provides only an "estimation" of the true perspective condition.
There are three types of texture mapping including linear, second order homogeneous perspective and second order non-homogeneous perspective. In linear texture mapping, texels of a texture map are generally mapped onto pixels of a 2-D graphics primitive linearly whereby the rate of sampling in texel space (u, v) with respect to the screen coordinate (x, y) update rate is constant, e.g., du/dx and du/dy are constant values. Linear texture mapping is not process intensive. In perspective texture mapping, texels of a texture map are generally mapped onto pixels of a 3-D graphics object that is displayed in 2-D space (x, y) wherein the rate of sampling in texel space with respect to the rate of screen coordinate update rate is not constant. Perspective texture mapping is process intensive and it features an illusion of depth which is created by varying the sampling rate of the texture map during the normal linearly performed polygon rendering process on the display screen.
In one system, a graphics subsystem (accelerator) performs the necessary processing to generate the simulation in real-time using interpolation driven processes to perform texture mapping. Typically, the graphics subsystem includes local memory for storing graphics data in a "display list" and a graphics engine that determines the texture (e.g., texture mapping) to be applied to picture elements (pixels) to form the simulation on the computer systems graphics display. Using techniques that are well understood by those skilled in the art, display images are first decomposed into graphics primitives comprising multiple polygons each of which may be readily rotated or otherwise transposed by the graphics subsystem before being sent to the frame buffer memory. As the perspective of the viewer changes, the displayed images must be redrawn to provide the proper visual perspective. Accordingly, graphics subsystems must be capable of mapping the texture onto the polygons in real-time as the position of the polygons are rotated, translated or otherwise shifted.
To maintain perspective, associated with each vertex of a graphics primitive, is a perspective value, W, that defines the spatial relation of the primitive with respect to its relative distance and position as it might appear to the eye of a viewer when rendered on the display. To perform perspective operations with high image quality, substantial computations are performed by the graphics subsystem. In low cost graphic engines, interpolation driven texture mapping and rendering processes are used to speed the rendering process and limit memory requirements. However, maintaining proper orientation of the texture map with respect to the polygon as the perspective changes and interpolating interior (u, v) texels requires extensive computing power to prevent distortion, artifacts, wavy appearances, alaising or other rendering errors. For images displayed in a video game with, by way of example, a road disappearing into the distance at infinity, the perspective can vary from W=1 for objects near the front of the screen perceived as close to the viewer to W=6 or W=10 (or greater) for objects receding into the distance near the back of the screen. Massive perspective (e.g., W&gt;5) in real-time computer simulations often cause hardware rendering engines perform a relatively large amount of computations (and time) to display the polygon without artifacts. This is especially true if the polygon is texture mapped.
However, in many applications real-time computer simulations do not require high image quality because the screen images rapidly change from frame to frame thereby hiding slight image degradation from the eye. In addition, some graphics elements, due to their small size, do not exhibit well their perspective nature, e.g., notwithstanding the fact that these small elements are displayed with perspective, they appear very linear to the eye. What is needed is a system that is operable between one mode whereby images are rendered in high quality, maintaining all accurate texture mapping, and perspective elements, and a second mode whereby images are rendered in high speed, but with some degradation in their texture mapping and perspective elements. What is further needed is a system also that increases processing efficiency with respect to small polygons whose perspective display closely resembles a linear display. The present invention provides such a system.
There are other factors affecting image quality and system performance. Such factors include mathematical accuracy in computing various color and geometry gradients (slopes), as well as error correction methods used to compensate for various hardware limitations. The greater degree of accuracy and error compensation used increases image quality, but at a cost of slower performance. Again, a system is needed in which a user can select various degrees of quality versus performance regarding these graphical computations and the present invention provides such a system.